package cn.wiseda.finance.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import cn.wiseda.finance.entity.Bank;

@Controller
public class TestController {

    @RequestMapping
    public String demo(@RequestParam(value = "userId", required = false) String userId,
            @RequestParam(value = "name", required = false) String name, Model model) {
        model.addAttribute("userId", userId);
        model.addAttribute("name", name);
        return "test/index";
    }
    
    @RequestMapping
    public Bank list() {
        Bank bank = new Bank();
        bank.setBankBalance(111.11);
        bank.setBankCode("00001");
        bank.setBankName("招商银行");
        bank.setBankRemarks("测试用银行");
        bank.setBankType("个人帐号");
        bank.setId(1);
        return bank;
    }
}
